
import { createApp } from 'vue'
import { createPinia } from 'pinia'
// import piniaPluginPersistedstate from 'pinia-plugin-persistedstate'
import App from './App.vue'
import router from './router'
import '@/styles/common.scss'
import {lazyPlugin} from '@/directives'
import {componentPlugin} from '@/components'
import piniaPluginPersistedstate from 'pinia-plugin-persistedstate'
// import {getCategoryAPI} from '@/apis/testapi'
// getCategoryAPI().then(res => {console.log(res)})

const app = createApp(App)
const pinia = createPinia()
app.use(pinia)
app.use(lazyPlugin)
app.use(router)
// 注册持久化插件
pinia.use(piniaPluginPersistedstate)
app.mount('#app')
// 注册全局组件
app.use(componentPlugin)
